package com.studyadmin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.studyadmin.entity.Class;
import com.studyadmin.mapper.ClassMapper;
import com.studyadmin.service.ClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 班级表 服务实现类
 * </p>
 *
 * @author lyl
 * @since 2023-04-01
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Class> implements ClassService {


    @Autowired(required = false)
    ClassMapper classMapper;

    public  Class selClassName(String cla){
        Class classNam = classMapper.selectOne(
                new QueryWrapper<Class>()
                        .select("cla_name")
                        .eq("cla_num",cla)
                        .eq("del_flag",0)
        );
        return classNam;
    }

}
